//-----------------------------------------------------------------------
// <copyright file="AuthenticationCompletedEventArgs.cs" company="Microsoft">
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace Microsoft.Live.Core
{
    using System;

    /// <summary>
    /// Represents the method that handles the AuthenticationCompleted event.
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    public delegate void AuthenticationCompletedEventHandler(object sender, AuthenticationCompletedEventArgs e);

    /// <summary>
    /// Provides data for the <c>AuthenticationCompleted</c> event.
    /// </summary>
    public class AuthenticationCompletedEventArgs : EventArgs
    {
        private readonly Identity identity;

        /// <summary>
        /// Initializes a new instance of the <see cref="AuthenticationCompletedEventArgs"/> class.
        /// </summary>
        /// <param name="identity"></param>
        public AuthenticationCompletedEventArgs(Identity identity)
        {
            this.identity = identity;
        }

        /// <summary>
        /// Gets the identity that was received.
        /// </summary>
        public Identity Identity
        {
            get { return this.identity; }
        }
    }
}